package com.bootdo.hjh.vo;

import com.bootdo.common.utils.UserType;
import com.bootdo.system.domain.UserDO;

/**
 * Created by qingyong on 2018/4/1.
 */

public class MemberRegVO {
    private Long userId;

    // 用户名
    private String username;

    // 用户真实姓名
    private String name;

    // 密码
    private String password;

    // 邮箱
    private String email;

    // 手机号
    private String mobile;

    //现居住地
    private String liveAddress;

    private Long startUserId;

    private Long recommendUserId;

    private String recommendUsername;

    private Long pointUserId;

    private String pointUsername;

    private String cardNumber;

    private Integer memberLevel;

    //产品ID
    private Integer productId;

    private Integer quantity;

    private String receiveName;

    private String receiveMobile;

    private String receiveAddress;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getLiveAddress() {
        return liveAddress;
    }

    public void setLiveAddress(String liveAddress) {
        this.liveAddress = liveAddress;
    }

    public Long getStartUserId() {
        return startUserId;
    }

    public void setStartUserId(Long startUserId) {
        this.startUserId = startUserId;
    }

    public Long getRecommendUserId() {
        return recommendUserId;
    }

    public void setRecommendUserId(Long recommendUserId) {
        this.recommendUserId = recommendUserId;
    }

    public Long getPointUserId() {
        return pointUserId;
    }

    public void setPointUserId(Long pointUserId) {
        this.pointUserId = pointUserId;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public Integer getMemberLevel() {
        return memberLevel;
    }

    public void setMemberLevel(Integer memberLevel) {
        this.memberLevel = memberLevel;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getReceiveName() {
        return receiveName;
    }

    public void setReceiveName(String receiveName) {
        this.receiveName = receiveName;
    }

    public String getReceiveMobile() {
        return receiveMobile;
    }

    public void setReceiveMobile(String receiveMobile) {
        this.receiveMobile = receiveMobile;
    }

    public String getReceiveAddress() {
        return receiveAddress;
    }

    public void setReceiveAddress(String receiveAddress) {
        this.receiveAddress = receiveAddress;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getPointUsername() {
        return pointUsername;
    }

    public void setPointUsername(String pointUsername) {
        this.pointUsername = pointUsername;
    }

    public String getRecommendUsername() {
        return recommendUsername;
    }

    public void setRecommendUsername(String recommendUsername) {
        this.recommendUsername = recommendUsername;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("MemberRegVO{");
        sb.append("userId=").append(userId);
        sb.append(", username='").append(username).append('\'');
        sb.append(", name='").append(name).append('\'');
        sb.append(", password='").append(password).append('\'');
        sb.append(", email='").append(email).append('\'');
        sb.append(", mobile='").append(mobile).append('\'');
        sb.append(", liveAddress='").append(liveAddress).append('\'');
        sb.append(", startUserId=").append(startUserId);
        sb.append(", recommendUserId=").append(recommendUserId);
        sb.append(", recommendUsername='").append(recommendUsername).append('\'');
        sb.append(", pointUserId=").append(pointUserId);
        sb.append(", pointUsername='").append(pointUsername).append('\'');
        sb.append(", cardNumber='").append(cardNumber).append('\'');
        sb.append(", memberLevel=").append(memberLevel);
        sb.append(", productId=").append(productId);
        sb.append(", quantity=").append(quantity);
        sb.append(", receiveName='").append(receiveName).append('\'');
        sb.append(", receiveMobile='").append(receiveMobile).append('\'');
        sb.append(", receiveAddress='").append(receiveAddress).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public UserDO toUserDO(){
        UserDO userDO = new UserDO();
        userDO.setType(UserType.MEMBER);
        userDO.setStatus(1);
        userDO.setUsername(this.username);
        userDO.setPassword(this.password);
        userDO.setName(this.name);
        userDO.setMobile(this.mobile);
        userDO.setLiveAddress(this.liveAddress);
        userDO.setStartUserId(this.startUserId);
        userDO.setRecommendUserId(this.recommendUserId);
        userDO.setPointUserId(this.recommendUserId);
        userDO.setPointSite(3);
        userDO.setCardNumber(this.cardNumber);
        userDO.setMemberLevel(this.memberLevel);
        return userDO;
    }
}
